/*
 * OpenFileTable.h
 *
 *  Created on: Jul 10, 2009
 *      Author: oferbart
 */

#ifndef OPENFILETABLE_H_
#define OPENFILETABLE_H_

#include <iostream>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>
#include <vector>
#include <sstream>
#include "Utils.h"
#include "MetadataBlock.h"
#include "INode.h"
#include "BlockNode.h"
#include "Utils.h"
#include "Log.h"
#include "HD.h"
#include "Directory.h"
#include <utility>
#include <math.h>
#include "OpenFileEntry.h"
using namespace std;

#define TABLESIZE 10

class OpenFileTable {
private:
	vector<OpenFileEntry* > _entries;

public:
	OpenFileTable();
	virtual ~OpenFileTable();

	int addEntry(FileSys* fs, int flag, int i_nodeNum, int blockSize);
	int removeEntry(int index);
	OpenFileEntry* getEntry(int index);
	bool isInodeOpen(int i_inodeNum);

};

#endif /* OPENFILETABLE_H_ */
